I think about the 10 commandments. The law said "thou shalt not kill."
But that only applied to the killing of your own people (hence the whole cities of refuge arrangement) it didn't mean not to kill in general. Because the Israelites waged war against all the inhabitants of the land. Committing some dreadful atrocities if the accounts are accurate.
So surely if the circumstances call for it warfare is acceptable today?